package com.educate.upms.model;

import com.educate.common.utils.gen.GenUtils;
import freemarker.template.TemplateException;

import java.io.IOException;

public class Generator {

    public static void main(String[] args) throws IOException, TemplateException {
        final String packageName = "com.educate.upms";
//        final String[] tfls = {"dao.ftl", "daoImpl.ftl", "bo.ftl", "service.ftl", "serviceImpl.ftl", "api.ftl"};
        final String[] tfls = {"serviceImpl.ftl"};
        final boolean skipExist = true;
//        String[] modelName = GenUtils.getModelNames("educate-upms\\educate-upms-model\\src\\main\\java\\com\\educate\\upms\\model\\po");
        final String[] modelName = {"UpmsOrganization"};
        String apiDir = "golf-api";
        String rpcDir = "educate-upms/educate-upms-rpc-api";
        String bizDir = "educate-upms/educate-upms-rpc-service";
        String daoDir = "educate-upms/educate-upms-dao";
        String modelDir = "educate-upms/educate-upms-model";

        GenUtils.generate(tfls, modelName, skipExist, packageName, apiDir, rpcDir, bizDir, modelDir, daoDir);
    }
}
